package com.xuyiwei.mayi.test;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created by xuyiwei on 2019/4/13.
 */
public class SynCollectionsDemo {
    public static void main(String[] args) {
        //这个相当于把list或者map重新包装了下 外面给他加了个锁
        List list = Collections.synchronizedList(new ArrayList<>());
    }
}
